
import request from '@/plugin/axios'

// 获取列表
export function getuserusergrouplist (params) {
  return request({
    url: '/upms/userusergroup/list',
    method: 'get',
    params: request.adornParams(params)
  })
}
// 某个用户组编号的用户字典信息【返回id和name】
export function getUserByUsergroupId (pkUsergroup) {
    return request({
      url: '/upms/userusergroup/dict/'+pkUsergroup,
      method: 'get',
      params: request.adornParams({})
    })
  }
// 获取信息
export function getuserusergroupinfo (id) {
  return request({
    url: '/upms/userusergroup/info/' + id,
    method: 'get',
    params: request.adornParams({})
  })
}

// 添加
export function adduserusergroup (data) {
  return request({
    url: '/upms/userusergroup/save',
    method: 'post',
    data
  })
}

// 修改
export function updateuserusergroup (data) {
  return request({
    url: '/upms/userusergroup/update',
    method: 'put',
    data
  })
}

// 批量删除
export function delBatchuserusergroup (params) {
  return request({
    url: '/upms/userusergroup/delete',
    method: 'post',
    data: request.adornData(params, false)
  })
}

// 删除
export function deluserusergroup(id) {
  return request({
    url: '/upms/userusergroup/delete/' + id,
    method: 'delete',
  })
}
